package com.xiang.api.config.MyConfig;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import lombok.Data;

@Data
@Component
public class Sql {
  public String address = "localhost";
  public int port = 3306;
  public String dataBase;
  @Value("${spring.datasource.dynamic.datasource.master.url}")
  private String url;
  public void setUrl(String p) {
    url = "jdbc:mysql://localhost:3306/cme?useSSL=false&allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8";
  }

  @Value("${spring.datasource.dynamic.datasource.master.username}")
  public String username;

  @Value("${spring.datasource.dynamic.datasource.master.password}")
  public String password;

  @Value("${spring.datasource.dynamic.datasource.master.driver-class-name}")
  public String driverClassName;
}
